Skip to main content

Deserialize JSON Array

AutomatR.DeafultActivities.API.DeserializeJSONArray

The "Deserialize JSON Array" activity in AutomatR is designed to deserialize a JSON array string into a Newtonsoft.Json.Linq.JArray variable. This activity is particularly useful for handling and processing JSON arrays within automation workflows.

Properties

NameDescription
Input
JSONSpecifies the JSON array string that needs to be deserialized. This input is required for the activity to function correctly. Provide a string containing the JSON array data, such as {'TenancyName': 'Documentation'}. String variables containing the JSON array data.
Optional
DelaySpecifies the amount of time (in seconds) to wait before executing the "Deserialize JSON Array" activity. This optional delay can be used to manage synchronization or pacing issues. Integer variables containing the delay duration (e.g., 5 for 5 seconds).
Output
JSON ArrayOutputs the deserialized JSON array as a Newtonsoft.Json.Linq.JArray variable. This variable can be used for further processing of the JSON array data within the workflow. Variables of type JArray to store the deserialized JSON array.

How to use:

  1. Drag and drop the "Deserialize JSON Array" activity onto the workflow.
  2. Configure the properties by specifying the JSON array string to be deserialized.
  3. Optionally, configure the delay to control the timing of the activity.
  4. Execute the workflow to deserialize the specified JSON array string.

Example: Consider an example where the "Deserialize JSON Array" activity is used to parse a JSON array string representing a list of tenants:

Deserialize JSON Array:
JSON: "{'TenancyList': [{'Name': 'Documentation'}, {'Name': 'Automation'}]}"
Delay: 3
JSON Array: deserializedJsonArray

In this example, the activity deserializes the provided JSON array string after a delay of 3 seconds. The deserialized JSON array object is stored in the variable deserializedJsonArray for further use in the workflow.